package com.design.decorator.coffee;

// 巧克力装饰者类，实现了装饰者接口
class ChocolateDecorator implements CoffeeDecorator {
    private Coffee coffee;

    public ChocolateDecorator(Coffee coffee) {
        this.coffee = coffee;
    }

    @Override
    public double getCost() {
        return coffee.getCost() + 1.5;
    }

    @Override
    public String getDescription() {
        return coffee.getDescription() + ", Chocolate";
    }
}
